package org.tech4j.common.core.sign.api;

import java.util.List;

/**
 * @program: tech4j-common
 * @description:
 * @author: YuKai Fan
 * @create: 2025/3/2 21:32
 **/
public class AppSignData {

    private String appKey;

    private String appSecret;

    private Boolean enabled;

    private Boolean open;

    private String appName;

    private List<PathData> pathDataList;

    public String getAppKey() {
        return appKey;
    }

    public void setAppKey(String appKey) {
        this.appKey = appKey;
    }

    public String getAppSecret() {
        return appSecret;
    }

    public void setAppSecret(String appSecret) {
        this.appSecret = appSecret;
    }

    public Boolean getEnabled() {
        return enabled;
    }

    public void setEnabled(Boolean enabled) {
        this.enabled = enabled;
    }

    public Boolean getOpen() {
        return open;
    }

    public void setOpen(Boolean open) {
        this.open = open;
    }

    public String getAppName() {
        return appName;
    }

    public void setAppName(String appName) {
        this.appName = appName;
    }

    public List<PathData> getPathDataList() {
        return pathDataList;
    }

    public void setPathDataList(List<PathData> pathDataList) {
        this.pathDataList = pathDataList;
    }



    public static class PathData {

        private String path;

        private Boolean enabled;

        public String getPath() {
            return path;
        }

        public void setPath(String path) {
            this.path = path;
        }

        public Boolean getEnabled() {
            return enabled;
        }

        public void setEnabled(Boolean enabled) {
            this.enabled = enabled;
        }
    }

    public static final class Builder {
        private String appKey;
        private String appSecret;
        private Boolean enabled;
        private Boolean open;
        private String appName;
        private List<PathData> pathDataList;

        private Builder() {
        }

        public static Builder builder() {
            return new Builder();
        }

        public Builder appKey(String appKey) {
            this.appKey = appKey;
            return this;
        }

        public Builder appSecret(String appSecret) {
            this.appSecret = appSecret;
            return this;
        }

        public Builder enabled(Boolean enabled) {
            this.enabled = enabled;
            return this;
        }

        public Builder open(Boolean open) {
            this.open = open;
            return this;
        }

        public Builder appName(String appName) {
            this.appName = appName;
            return this;
        }

        public Builder pathDataList(List<PathData> pathDataList) {
            this.pathDataList = pathDataList;
            return this;
        }

        public AppSignData build() {
            AppSignData appSignData = new AppSignData();
            appSignData.setAppKey(appKey);
            appSignData.setAppSecret(appSecret);
            appSignData.setEnabled(enabled);
            appSignData.setOpen(open);
            appSignData.setAppName(appName);
            appSignData.setPathDataList(pathDataList);
            return appSignData;
        }
    }
}
